const getters = {
  // 建立相关的映射
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  // 开放username
  username: state => state.user.userInfo.username,
  userId: state => state.user.userInfo.userId,
  staffPhoto: state => state.user.userInfo.staffPhoto, // 建立用户头像的映射
  // 开放公司的id属性
  companyId: state => state.user.userInfo.companyId,
  // 导出当前的路由
  routes: state => state.permission.routes, // 将子模块的权限开放
  userInfo: state => state.user.userInfo

}
export default getters
